import 'package:flutter/material.dart';
import 'package:ruitmentapp/core/extension/create_materialColor.dart';

class ZJBaseController extends StatefulWidget {

  bool isHideNavigationBar;
  String title;
  Widget buildViewContent;
  ZJBaseController(this.isHideNavigationBar, this.title, {this.buildViewContent, Key key}) : super(key: key) {
    isHideNavigationBar = isHideNavigationBar;
    title = title;
    buildViewContent = buildViewContent;
  }
  
  @override
  State<ZJBaseController> createState() => _ZJBaseControllerState();
}

class _ZJBaseControllerState extends State<ZJBaseController> {
  @override
  Widget build(BuildContext context) {
    if(widget.isHideNavigationBar){
      return Scaffold(
        appBar: AppBar(
          backgroundColor: const Color(0xFFF3F5F7),
          title: Text(widget.title),
          elevation: 0,
          toolbarHeight: 0,
        ),
        body: widget.buildViewContent,
      );
    }else{
      return Scaffold(
        body: widget.buildViewContent,
      );
    }
  }

}
